package com.zhuge_new.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.zhuge_new.Base.BaseActivity;
import com.zhuge_new.R;
import com.zhuge_new.untils.ActivityStack;

/**
 * Created by Administrator on 2018/9/30.
 */

public class SelectRedActivity extends BaseActivity implements View.OnClickListener {

    private String location;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_selectred);
        init_title();
        Intent intent=getIntent();
        location = intent.getStringExtra("location");
    }

    @Override
    public void init_title() {
        super.init_title();
        TextView tv_title=findViewById(R.id.tv_nav_title);
        ImageView iv_back=findViewById(R.id.iv_nav_back);
        Button sel_btn1=findViewById(R.id.sel_btn1);
        Button sel_btn2=findViewById(R.id.sel_btn2);
        Button sel_btn3=findViewById(R.id.sel_btn3);
        tv_title.setText("发红包");
        iv_back.setOnClickListener(this);
        sel_btn1.setOnClickListener(this);
        sel_btn2.setOnClickListener(this);
        sel_btn3.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.iv_nav_back:
                ActivityStack.getScreenManager().popOneActivity(SelectRedActivity.class);
                break;
            case R.id.sel_btn1:
                break;
            case R.id.sel_btn2:
                Intent intent2=new Intent(this,AdvertisingRedActivity.class);
                intent2.putExtra("location",location);
                startActivity(intent2);
                break;
            case R.id.sel_btn3:
                Intent intent3=new Intent(this,RedpackageActivity.class);
                startActivity(intent3);
                break;
        }
    }
}
